home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
comm2
/
netecho.rdm
< prev
next >
Wrap
Text File
|
1996-02-22
|
1KB
|
42 lines
Short: Netecho checks if a host is available.
Author: atte@crash.north.de (Andreas Gelhausen)
Uploader: cosinus@deepthought.north.de (Christian Stelter)
Type: comm/tcp
System requirements: Kickstart 2.04+ and AmiTCP 4.0+
Usage
=====
netecho is based on the TCP/IP service 'echo' and it's useful to
check the availability of a certain host within scripts. If the given
host is available, the string 'NETECHO' will be printed and the return
value is set to 0 (RETURN_OK). Otherwise an error message is printed
and the return value is set to 20 (RETURN_FAIL).
Usage:
netecho <hostname>
Example:
netecho crash.north.de
Example script 1:
failat 21
netecho >nil: crash.north.de
if warn
echo "crash.north.de is not available!"
else
echo "crash is alive! =¦^)"
endif
Example script 2:
failat 21
if "`netecho crash.north.de`" eq "NETECHO"
echo "crash is alive! =¦^)"
else
echo "crash.north.de is not available!"
endif